<template>
  <div :style="'background-image:url('+ background1 +');'" class="login">
    <div class="login-header">
      <Language/>
    </div>
    <div class="container">
      <div class="login-main">
        <LoginForm/>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import LoginForm from './components/login-form.vue';
import Language from '@/layout/components/header-bar/language.vue';
import background1 from '@/assets/images/background.jpeg';
//import background2 from '@/assets/images/background.jpg';
</script>

<style lang="scss" scoped>
@use "@/styles/var" as _v;

.login {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  position: relative;
  background-size: cover;
  height: 100vh;
  overflow: hidden;

  .login-header {
    position: fixed;
    right: 24px;
    top: 16px;

    :deep(.el-dropdown) {
      cursor: pointer;

      .action-language {
        outline: none;
        font-size: 16px;
      }
    }
  }

  .container {
    margin: 0 auto;
    width: 400px;
    box-shadow: -4px 5px 10px rgba(0, 0, 0, .4);
    z-index: 1000;

    @media (max-width: _v.$sm) {
      width: 90%;
    }

    .login-top {
      text-align: center;
      padding: 32px 0;

      .login-top-header {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        line-height: 44px;

        > img {
          height: 44px;
          margin-right: 16px;
        }

        .login-logo-title {
          font-weight: 600;
          font-size: 32px;
        }
      }

      .login-logo-desc {
        margin-top: 22px;
        color: var(--el-text-color-secondary);
      }
    }

    .login-main {
      color: #fff;
      background-color: hsla(0, 0%, 100%, .9);
      border-radius: 3px;
    }

    .login-other {
      text-align: left;

      .login-other-label {
        color: var(--el-text-color-regular);
      }

      > img {
        width: 22px;
        margin-left: 16px;
        vertical-align: middle;
        opacity: 0.6;
        transition: all 0.2s ease-in-out;
        cursor: pointer;

        &:hover {
          opacity: 1;
        }
      }
    }
  }
}
</style>
